package com.liangwj.springbootdesignpatterns.createTypePatterns.simpleFactoryPattern;

/**
 * <b>Description:</b> 简单工厂模式-普通模式-测试类 <br/>
 * @author Lingwenjun
 * @date 2019/1/21-10:56
 * @version 1.0
 */
public class FactoryTest {

    public static void main(String[] args) {
        SendFactory factory = new SendFactory();
        //normal
        Sender sender = factory.produce("sms");
        sender.send();

        // mutil methods
        Sender sender1 = factory.produceMail();
        sender1.send();

        // static mutil methods
        Sender sender2 = SendFactory.produceStaticMail();
        sender2.send();
    }
}
